Editing Movies
The Movie Toolbox provides a set of high-level functions that allow you to edit movies. This section describes these high-level editing functions. These functions work with a movie's current selection. The current selection is defined by a starting time and a duration.The Movie Toolbox also provides functions that allow you to edit movie segments. Those functions are described in "Low-Level Movie-Editing Functions" beginning on page 2-240.
The movies created by these functions contain references to the data in the source movie. Because the new movies contain references and not data, they are small and easily moved to and from the scrap. If you delete the movie that contains the data, the data references in the new movies are no longer valid and the new movies cannot be played. Therefore, before you delete the original movie, you should call the
FlattenMovie
function (described on page 2-93) for each of the new movies. This function copies the data into each of the new movies, eliminating the data references.Note that the Movie Toolbox does not always copy empty tracks from the source movie to the movies that are created by these functions. Specifically, the Movie Toolbox preserves the empty tracks until you paste or add the selection into the destination movie. At that time, the Movie Toolbox removes the empty tracks from the selection. In addition, if a track in the source movie has trailing empty space, the Movie Toolbox removes that empty space from the track when it is copied into the new movie. Therefore, if you want to add a segment beyond the end of a movie, you insert the space when you insert the new segment using the
InsertMovieSegment
function (described on page 2-241).The Movie Toolbox allows you to paste different data types into a movie. For example, QuickDraw pictures and standard sound data can be pasted directly into a movie. If you are using the movie controller component, you do not need to use these functions to paste different data types into a movie. (For details on the movie controller component, see Inside Macintosh: QuickTime Components.) If you are calling the Movie Toolbox directly to do editing, you should use the functions described in this section.
To get and change a movie's current selection, your application can call the
GetMovieSelection
andSetMovieSelection
functions.Your application can work with a movie's current selection by calling the
CutMovieSelection
,CopyMovieSelection
,PasteMovieSelection
,ClearMovieSelection
, andAddMovieSelection
functions.The
PutMovieOnScrap
andNewMovieFromScrap
functions enable your application to work with movies that are on the scrap.The
IsScrapMovie
function examines the system scrap to determine whether it can translate any of the data into a movie. ThePasteHandleIntoMovie
takes the contents of a specified handle, together with its type, and pastes it into a movie.PutMovieIntoTypedHandle
takes a movie (or a single track from within a movie) and converts it into a handle.
Subtopics
- PutMovieOnScrap
- NewMovieFromScrap
- SetMovieSelection
- GetMovieSelection
- CutMovieSelection
- CopyMovieSelection
- PasteMovieSelection
- AddMovieSelection
- ClearMovieSelection
- IsScrapMovie
- PasteHandleIntoMovie
- PutMovieIntoTypedHandle